#ifndef db_ADAPTERPTR_H
#define db_ADAPTERPTR_H

namespace serika
{
	namespace db
	{
		class Adapter;
	
		class AdapterPtr
		{
		public:
			AdapterPtr(Adapter*& adapter);
			~AdapterPtr();
	
			Adapter* operator ->();
			Adapter& operator *();
			AdapterPtr& operator =(Adapter*& adapter);
			AdapterPtr& operator =(const AdapterPtr& ptr);
			bool operator ==(const void* rawPtr) const;
			bool operator ==(const AdapterPtr& ptr) const;
			operator Adapter*();
		private:
			Adapter** mAdapter;
		};
	}
}

#endif
